package com.zz.ecommerce.myplatform;

import org.apache.commons.lang3.StringUtils;

/**
 * Created by Administrator on 2015/11/26.
 */
public class MyPlayformBean {

    private String custImp;
    private String custExp;
    private String inspImp;
    private String inspExp;
    private String monImp;
    private String monExp;

    private String monLLImp;
    private String monLLExp;
    private int release;
    private int releaseLL;

    private String toZero(String val){
        return StringUtils.isEmpty(val)?"0":val;
    }
    public String getCustImp() {
        return toZero(custImp);
    }

    public void setCustImp(final String custImp) {
        this.custImp = custImp;
    }

    public String getCustExp() {
        return toZero(custExp);
    }

    public void setCustExp(final String custExp) {
        this.custExp = custExp;
    }

    public String getInspImp() {
        return StringUtils.isEmpty(inspImp) ? "0" : inspImp;
    }

    public void setInspImp(final String inspImp) {
        this.inspImp = inspImp;
    }

    public String getInspExp() {
        return StringUtils.isEmpty(inspExp) ? "0" : inspExp;
    }

    public void setInspExp(final String inspExp) {
        this.inspExp = inspExp;
    }

    public String getMonImp() {
        return toZero(monImp);
    }

    public void setMonImp(final String monImp) {
        this.monImp = monImp;
    }

    public String getMonExp() {
        return toZero(monExp);
    }

    public void setMonExp(final String monExp) {
        this.monExp = monExp;
    }

    public String getMonLLImp() {
        if (StringUtils.isEmpty(monLLImp)) {
            return "0";
        }
        return String.valueOf(Math.floor(((Integer.parseInt(getMonImp()) - Integer.parseInt(monLLImp)) /
                                          Integer.parseInt
                                              (monLLImp)) * 100));
    }

    public void setMonLLImp(final String monLLImp) {
        this.monLLImp = monLLImp;
    }

    public String getMonLLExp() {
        if (StringUtils.isEmpty(monLLExp)) {
            return "0";
        }
        return String.valueOf(Math.floor(((Integer.parseInt(getMonExp()) - Integer.parseInt(monLLExp)) /
                                          Integer.parseInt
                                              (monLLExp)) * 100));
    }

    public void setMonLLExp(final String monLLExp) {
        this.monLLExp = monLLExp;
    }

    public int getRelease() {
        return this.release;
    }

    public void setRelease(final int release) {
        this.release = release;
    }

    public int getReleaseLL() {
        return this.releaseLL;
    }

    public void setReleaseLL(final int releaseLL) {
        this.releaseLL = releaseLL;
    }
}
